-
Notifications
You must be signed in to change notification settings - Fork 20
feat: add suspend/resume support for RPA invocations in evaluations #1083
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Quick Testing GuideInstall the Dev Versionpip install git+https://github.com/UiPath/[email protected]Run Quick Testcd samples/event-trigger
# Test 1: Direct runtime test
python -c "
import asyncio
from uipath.functions.runtime import UiPathFunctionsRuntime
async def test():
runtime = UiPathFunctionsRuntime(
'test_suspend_resume_agent.py',
'main',
'test_suspend_resume_agent'
)
result = await runtime.execute({'query': 'Test'})
print(f'✓ Status: {result.status}')
print(f'✓ Has Trigger: {result.trigger is not None}')
if result.trigger:
print(f'✓ Process: {result.trigger.payload[\"process_name\"]}')
asyncio.run(test())
"
# Test 2: Evaluation test
uipath eval test_suspend_resume_agent evaluations/test_suspend_resume.json --output-file test_output.json
cat test_output.json | python -m json.tool | grep -A 5 "status"Expected Results✅ Status: Key Files Changed
Tag: |
0a124f0 to
a35d2a5
Compare
|
Just to understand, so the |
| from uipath.runtime.errors import ( | ||
| UiPathErrorCategory, | ||
| UiPathErrorCode, | ||
| UiPathErrorContract, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need to undo everything in this file (this is used for arbitrary python code, no langgraph deps)
|
|
||
| result = UiPathRuntimeResult( | ||
| output={**results.model_dump(by_alias=True)}, | ||
| status=UiPathRuntimeStatus.SUCCESSFUL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the runtime is suspended, you need to pass the result as suspended to the serverless exector
This commit consolidates changes for suspend/resume functionality: - Add suspend/resume support for RPA invocations in evaluations - Add --resume option and trigger pass-through to eval runtime - Add comprehensive logging for suspend/resume detection - Add architecture documentation for interrupt/suspend/resume patterns - Add Claude Code skills for agents - Add content_tokens and argument_properties to agent model - Expose more configs in manager - Add documents samples - Fix linting issues in functions runtime - Remove deprecated hello-world sample - Update evaluation spans with output attributes and metadata 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
a35d2a5 to
c2548d0
Compare
Summary
Adds support for suspend/resume pattern in evaluation runtime, enabling agents to suspend execution when invoking RPA processes and resume after completion.
Key Changes
Suspend Detection (_runtime.py)
UiPathRuntimeStatus.SUSPENDEDafter agent executionResume Support (cli_eval.py)
--resumeflag to evaluation CLITrigger Pass-Through
interruptId: Unique interrupt identifiertriggerType: Type of trigger (e.g., "Api")payload: InvokeProcess details (process name, input arguments, folder path)Comprehensive Logging
Testing
Testing is done via the sample agent in the companion PR: UiPath/uipath-langchain-python#397
Related
Companion PR for sample agent: UiPath/uipath-langchain-python#397